package com.bdqn.business.academic.controller;

import com.bdqn.aop.Log;
import com.bdqn.business.academic.service.QuestionService;
import com.bdqn.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/question")
public class QuestionController {

    @Autowired
    private QuestionService questionService;

    @Log("通过章节ID和试题类型获取试题数量")
    @RequestMapping(value = "/getQuestionsByChapterIdsAndQuestionTypeIds",method = RequestMethod.POST)
    public Result getQuestionsByChapterIdsAndQuestionTypeIds(@RequestBody Map<String,Object> map){
        return questionService.getQuestionsByChapterIdsAndQuestionTypeIds(map);
    }
}
